//
//  ReplayViewController.m
//  兼职页面
//
//  Created by kuiyuan liang on 2021/5/25.
//

#import "ReplayViewController.h"
#import "CommonUtil.h"

@interface ReplayViewController ()
@property (strong, nonatomic) UIButton * backBtn;
@property (strong, nonatomic) UITextView * inputTextView;
@property (strong, nonatomic) UIButton * emojiBtn;
@property (strong, nonatomic) UIButton * submitBtn;
@end

@implementation ReplayViewController

- (void)viewDidLoad {
    [super viewDidLoad];
  
    self.view.backgroundColor = RGB(243.0, 243.0, 243.0);
    [self.view addSubview:self.backBtn];
    [self.view addSubview:self.inputTextView];
    [self.view addSubview:self.emojiBtn];
    [self.view addSubview:self.submitBtn];
}

- (void)backBtnClick:(UIButton *)sender{
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)emojiBtnClick:(UIButton *)sender{
    
}

- (void)submitBtnClick:(UIButton *)sender{
    
}

-(UIButton *)backBtn{
    if (!_backBtn) {
        _backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        [_backBtn setTitle:@"取消" forState:UIControlStateNormal];
        [_backBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        _backBtn.frame = CGRectMake(AD(20),AD(40), AD(40), AD(20));
        _backBtn.titleLabel.font = [UIFont systemFontOfSize:AD(16)];
        [_backBtn addTarget:self action:@selector(backBtnClick:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _backBtn;
}

-(UITextView *)inputTextView{
    if (!_inputTextView) {
        _inputTextView = [[UITextView alloc] initWithFrame:CGRectMake(AD(20), AD(80), SCREEN_WIDTH-AD(40), AD(150))];
        _inputTextView.backgroundColor = [UIColor whiteColor];
        _inputTextView.layer.cornerRadius = AD(5);
        _inputTextView.clipsToBounds = YES;
    }
    return _inputTextView;
}

-(UIButton *)emojiBtn{
    if (!_emojiBtn) {
        _emojiBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        [_emojiBtn setTitle:@"😊表情" forState:UIControlStateNormal];
        [_emojiBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        _emojiBtn.frame = CGRectMake(AD(20),_inputTextView.bottom + AD(10), AD(80), AD(20));
        _emojiBtn.titleLabel.font = [UIFont systemFontOfSize:AD(16)];
        [_emojiBtn addTarget:self action:@selector(emojiBtnClick:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _emojiBtn;
}

-(UIButton *)submitBtn{
    if (!_submitBtn) {
        _submitBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        [_submitBtn addTarget:self action:@selector(submitBtnClick:) forControlEvents:UIControlEventTouchUpInside];
        [_submitBtn setTitle:@"提交" forState:UIControlStateNormal];
        [_submitBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        _submitBtn.titleLabel.font = [UIFont systemFontOfSize:AD(18)];
        _submitBtn.frame = CGRectMake(AD(20), _emojiBtn.bottom + AD(100), SCREEN_WIDTH - AD(40), AD(50));
        _submitBtn.backgroundColor = RGB(255.0, 90.0, 117.0);
        _submitBtn.layer.cornerRadius = AD(3);
        _submitBtn.enabled = false;
        _submitBtn.alpha = 0.4;
    }
    
    return _submitBtn;
}


@end
